<template>
   <div class="app">
     <button @click="getStudents">点击调用接口结果</button>
   </div>
</template>

<script>
import axios from 'axios'
export default {
  name: "App",
  methods:{
    getStudents(){
      axios.get('http://localhost:8080/api/students').then(
          response=>{
            console.log(response.data)
          },
          error=>{
            console.log(error.message)
          }
      )
    }
  }
}
</script>

<style>

</style>


